package day04.JUnitTest;

import day04.Demo02.Users;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class JunitTesting {

    private Users users;

    @Before
    public void beforeFunction(){

//      必须先实例化users，users.hello才能调用成功
        users= new Users();

        System.out.println("先执行的方法");
    }

    @After
    public void afterFunction(){
        System.out.println("后执行的方法");
    }

    @Test
    public void hello(){
        users.uage=123;
        users.hello();
    }


}
